package com.example.admin.myapplication.modul;

import android.view.animation.AlphaAnimation;

import dagger.Module;
import dagger.Provides;

/**
 * Created by admin on 2016/4/28.
 */
@Module
public class MainAnimationModule {

    private int duration;
    private float startAlpha;
    private float endAlpha;

    public MainAnimationModule(int duration,float startAlpha,float endAlpha){
        this.duration = duration;
        this.startAlpha = startAlpha;
        this.endAlpha = endAlpha;
    }

    @Provides
    public AlphaAnimation provideAlphaAnimation(){
        AlphaAnimation aa = new AlphaAnimation(startAlpha,endAlpha);
        aa.setDuration(duration);
        aa.setFillAfter(true);
        return aa;
    }

}
